<?php

function redirectionErreur404()
{
	header('HTTP/1.0 404 Not Found');
	exit;
}
$login = false;
// Initialisation
require('inc/init.inc.php');
$db->Script('update.sql');
exit;

$cle = get_param('RM9ZsnL9M2', -1);

$result = $db->query('SELECT svg FROM version');
$row = $result->fetch_assoc();
$num = $row['svg'];
$t= strftime('%y%m%d');
$s= SHA1($t.' sauvegarde '.($num+1));
if ($cle!= $s)
	redirectionErreur404();
else
{
	$result = $db->query("UPDATE version SET svg = '".($num+1)."'");
	system("mysqldump --host=".DB_HOST." --user=".DB_USER." --password=".DB_PASS." ".DB_BASE."");
}
?>
